package com.sky.skyopsserver.vos;

import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class HostAddReqVO {
    
    @NotBlank(message = "机器名称不能为空")
    @Size(max = 255, message = "机器名称长度不能超过255个字符")
    private String name;
    
    @NotNull(message = "所属机房ID不能为空")
    @Positive(message = "所属机房ID必须为正数")
    private Long roomId;
    
    @NotNull(message = "所属主机组ID不能为空")
    @Positive(message = "所属主机组ID必须为正数")
    private Long groupId;
    
    @Size(max = 255, message = "公网IP地址长度不能超过255个字符")
    private String publicHost;
    
    @Size(max = 255, message = "私有IP地址长度不能超过255个字符")
    private String privateHost;
    
    @Min(value = 1, message = "端口必须大于0")
    @Max(value = 65535, message = "端口必须小于等于65535")
    private Integer port;
    
    @Size(max = 255, message = "凭据长度不能超过255个字符")
    private String credential;
    
    @NotBlank(message = "机器类型不能为空")
    @Size(max = 50, message = "机器类型长度不能超过50个字符")
    private String type;
    
    @Size(max = 255, message = "系统版本长度不能超过255个字符")
    private String osVersion;
    
    @Size(max = 255, message = "SSH连接地址长度不能超过255个字符")
    private String sshHost;
    
    @Min(value = 1, message = "CPU数量必须大于0")
    private Integer cpuCount;
    
    @Size(max = 255, message = "CPU型号长度不能超过255个字符")
    private String cpuName;
    
    @DecimalMin(value = "0.1", message = "内存大小必须大于0.1GB")
    private Double memory;
    
    @Size(max = 1000, message = "硬盘信息长度不能超过1000个字符")
    private String diskInfo;
    
    @Size(max = 500, message = "备注长度不能超过500个字符")
    private String remark;
    
    private LocalDateTime listingTime;
    private LocalDateTime expirationTime;
}